package org.swust.sysmonitorapp.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;

/**
 * 设备状态表
 *
 * @since 2024-03-21
 */
@Data
@TableName("device_status")
public class DeviceStatus implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 设备ID，作为主键
     */
    @TableId(value = "device_id")
    private String deviceId;

    /**
     * 设备状态：online-在线，offline-离线
     */
    @TableField("status")
    private String status;

    /**
     * 最后在线时间
     */
    @TableField("last_online_time")
    private LocalDateTime lastOnlineTime;
}